﻿using System.Windows;
using Microsoft.Win32;

namespace InterLinq.Test.UI {
	/// <summary>
	/// Interaction logic for SelectConnectionStringWindow.xaml
	/// </summary>
	public partial class SelectConnectionStringWindow : Window {
		private readonly string m_registryKey;
		private readonly string m_valueName;

		public SelectConnectionStringWindow(string testName, string registryKey, string valueName) {
			InitializeComponent();
			m_testName.Content = testName;
			m_registryKey = registryKey;
			m_valueName = valueName;
		}

		private void OnSave(object sender, RoutedEventArgs e) {
			Registry.SetValue(m_registryKey, m_valueName, m_cnn.Text);
			Close();
		}
	}
}